package com.itheima.practice.demo07;

import java.util.concurrent.ArrayBlockingQueue;

public class ArrayBlockingQueueDemo {
    public static void main(String[] args) {
        ArrayBlockingQueue<String> list = new ArrayBlockingQueue<>(1);
        Cooker c = new Cooker(list);
        Foodie f = new Foodie(list);
        c.setName("生产者");
        f.setName("消费者");
        c.start();
        f.start();
    }
}
